package com.hongshan.wallet.base

import android.text.Editable
import android.text.TextWatcher

/**
 * Copyright Zhangxx.
 * Copyright (c) 2019
 * All rights reserved
 *
 * @project  : Wallet
 * @package  : com.example.wallet.base
 * @author   : zhangxx
 * @date     : 2019/3/29
 * @email    : qq957413212@hotmail.com
 * @desc     : //TODO
 */
class SimpleTextWatcher(val listener: ((String) -> Unit)) : TextWatcher {
    override fun afterTextChanged(s: Editable?) {
        listener.invoke(s.toString())
    }

    override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {

    }

    override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {

    }
}